﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FangChanCrm.Controllers
{
    public static class LoginSession
    {
        public static IActionResult ReturnBoolSessionAndCookie(string session, string cookie, IActionResult ReturnLogin, IActionResult ReturnLoginAgain, IActionResult yemian)
        {
            if (session == "" || session == null)
            {
                if (cookie == "" || cookie == null)
                {
                    return ReturnLogin;
                }
                else
                {
                    return ReturnLoginAgain;
                }
            }
            else
            {
                return yemian;
            }
        }
    }
}
